home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
funcom 2000 Presskit
/
000721_1312 (fun.com).iso
/
funcom.dir
/
00023_Script_Slider Track behavior
< prev
next >
Wrap
Text File
|
2000-07-20
|
841b
|
31 lines
-- Slider Track behavior
-----------------------------------------------------------
-- This behavior tells the slider behavior when you have
-- clicked the track and the stage location where you
-- clicked.
--
-- You attach this behavior to a sprite representing a
-- track.
--
-- David Benman 11/97
-----------------------------------------------------------
on mouseDown me
set currentSprite to the spriteNum of me
set trackWidth to the width of sprite currentSprite
set trackHeight to the height of sprite currentSprite
-- Sends the horizontal or vertical mouse location to the
-- slider behavior.
if trackWidth > trackHeight then
set newPosition to the mouseH
else
set newPosition to the mouseV
end if
sendSprite(the spriteNum of me + 1, #slideButton, newPosition)
end